package com.example.demo.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.example.demo.entity.MyUser;
import com.example.demo.service.MyUserService;

@Controller
@RequestMapping("user")
public class MyUserController {
	
	@Resource
	private MyUserService mUserService;
	
	@RequestMapping("insert")
	@ResponseBody
	public MyUser insert(MyUser myUser) {
		return mUserService.insert(myUser);
	}
	
	@RequestMapping("all")
	@ResponseBody
	public Object findAll() {
		return mUserService.findAll();
	}
	
}
